﻿using System.Windows;
using System.Windows.Media;

namespace QH_MSS_WPF_Core.Extensions
{
    public static class GridExtensions
    {
        public static readonly DependencyProperty GridLineBrushProperty = DependencyProperty.RegisterAttached(
            "GridLineBrush", typeof(Brush), typeof(GridExtensions), new PropertyMetadata(Brushes.LightGray));

        public static void SetGridLineBrush(DependencyObject d, Brush value)
        {
            d.SetValue(GridLineBrushProperty, value);
        }

        public static Brush GetGridLineBrush(DependencyObject d)
        {
            return (Brush)d.GetValue(GridLineBrushProperty);
        }

        public static readonly DependencyProperty GridLineThicknessProperty = DependencyProperty.RegisterAttached(
            "GridLineThickness", typeof(double), typeof(GridExtensions), new PropertyMetadata(1.0));

        public static void SetGridLineThickness(DependencyObject d, double value)
        {
            d.SetValue(GridLineThicknessProperty, value);
        }

        public static double GetGridLineThickness(DependencyObject d)
        {
            return (double)d.GetValue(GridLineThicknessProperty);
        }
    }
}
